/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Validations;

import Services.exception.ServiceException;
import Services.exception.UnableToConnectException;
import Services.StoreEmployeeServices;
import beans.StoreEmployeeBean;

/**
 *
 * @author Anthar
 */
public class StoreEmployeeValidation {

    private StoreEmployeeServices storeEmployeeService;

    public StoreEmployeeValidation(){
        storeEmployeeService = new StoreEmployeeServices();
    }

    public boolean existStoreEmployee(int idStoreEmployee) throws ServiceException{
           StoreEmployeeBean storeEmployee= getStoreEmployeeService().searchEmployee(idStoreEmployee);
           if(storeEmployee!=null){
              return true;
           }
           return false;
    }

    /**
     * SETTERS Y GETTERS
     */

    /**
     * @return the storeEmployeeService
     */
    public StoreEmployeeServices getStoreEmployeeService() {
        return storeEmployeeService;
    }

    /**
     * @param storeEmployeeService the storeEmployeeService to set
     */
    public void setStoreEmployeeService(StoreEmployeeServices storeEmployeeService) {
        this.storeEmployeeService = storeEmployeeService;
    }

}
